home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 June
/
ccd0605.iso
/
Software
/
Freeware
/
Programare
/
highlight
/
highlight-W32GUI-2.2-10b-Setup.exe
/
{app}
/
src
/
ansigenerator.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-07-09
|
2KB
|
82 lines
/***************************************************************************
ansicode.h - description
-------------------
begin : Jul 5 2004
copyright : (C) 2004 by Andre �Simon
email : andre.simon1@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef ANSIGENERATOR_H
#define ANSIGENERATOR_H
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include "codegenerator.h"
#include "charcodes.h"
#include "version.h"
namespace highlight {
/**
\brief This class generates ANSI escape sequences.
It contains information about the resulting document structure (document
header and footer), the colour system, white space handling and text
formatting attributes.
* @author Andre Simon
*/
class AnsiGenerator : public highlight::CodeGenerator
{
public:
/** Constructor
\param colourTheme Name of Colour theme to use
*/
AnsiGenerator( const string &colourTheme);
AnsiGenerator();
~AnsiGenerator();
/** prints document header
\param title Title of the document
*/
string getHeader(const string & title);
/** Prints document footer*/
string getFooter();
/** Prints document body*/
void printBody();
private:
/** \return escaped character*/
virtual string maskCharacter(unsigned char );
/** gibt ANSI-"Tags" zurueck (Farbindex+bold+kursiv)*/
string getOpenTag(const string&font,
const string&fgCol, const string&bgCol);
string getMatchingOpenTag(unsigned int styleID);
string getMatchingCloseTag(unsigned int styleID);
};
}
#endif